package com.share.threadmethod;

public class Demo2_CurrentThread {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		//thread线程
		new Thread() {
			public void run() {
				Thread.currentThread().setName("123");
				System.out.println(this.getName() + "....aaaaaa");
			}
		}.start();
		
		
		//runnable线程
		new Thread(new Runnable() {
			public void run() {
				Thread.currentThread().setName("SUNXJ");
				System.out.println(Thread.currentThread().getName()+ "__________");
				
			}
		}).start();
		
		//主线程----主线程会调用main方法
		Thread.currentThread().setName("我是主线程");
		System.out.println(Thread.currentThread().getName());
		

	}

}
